|
In the theory of formal languages of computer science, mathematics, and linguistics, the Dyck language is the language consisting of balanced strings of square brackets (and ). It is important in the parsing of expressions that must have a correctly nested sequence of brackets, such as arithmetic or algebraic expressions. It is named after the mathematician Walther von Dyck. ==Formal definition== Let be the alphabet consisting of the symbols (and ) and let denote its Kleene closure. For any element with length we define partial functions and by : is with "" inserted into the th position : is with "" deleted from the th position with the understanding that is undefined for and is undefined if . We define an equivalence relation on as follows: for elements we have if and only if there exists a finite sequence of applications of the and functions starting with and ending with , where the empty sequence is allowed. That the empty sequence is allowed accounts for the reflexivity of . Symmetry follows from the observation that any finite sequence of applications of to a string can be undone with a finite sequence of applications of . Transitivity is clear from the definition. The equivalence relation partitions the language into equivalence classes. If we take to denote the empty string, then the language corresponding to the equivalence class is called the Dyck language. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Dyck language」の詳細全文を読む スポンサード リンク
|